I. Field
This application relates to data processing and, more particularly, to saving objects to a database as part of a finalize sequence.
II. Background and Material Information
In a client-services architecture, a client system, such as a computer, may call an application, such as a service or web service, at a server to interact with the application through the Internet or an intranet. A service, such as a web service, is an application (or program) that makes itself available over the Internet or an intranet, uses standardized messaging, such as XML (extensible Markup Language) and Simple Object Access Protocol (SOAP), and uses some type of location mechanism, such as UDDI (Universal Description, Discovery, and Integration), to locate the service and its public Application Program Interface (API).
To call a service through the Internet or intranet, the client system makes a call though an API, which defines the way the client communicates with the service. The service instantiates objects, such as business objects, in response to the API call. As used herein, the term “instantiate” means, in an object oriented programming environment, producing an object of a particular class and, more generally, includes deploying, customizing, running and/or executing an application. As used herein, an “object” means a software bundle of variables (e.g., data) and related methods. For example, in object-oriented programming, an object is a concrete realization (instance) of a class that consists of data and the methods associated with that data. The phrase “business object” refers to a software bundle of data and related methods that can be used for describing a business process (or task).
An example of a service is a “catalog” service, which can be called through the Internet by a client system. The catalog service may allow a user at a client system to view and purchase products. FIG. 3 depicts some of the business objects that may be associated with the catalog service. The business objects may, for example, correspond to data listing each product (business object 402), product descriptions 404, available quantity 406 (e.g., quantity of products available in stock), and quantity ordered 408. When a client system calls the catalog service, the catalog service instantiates business objects 402-408, allowing objects 402-408 to retrieve from a database data and method associated with those objects. The retrieved data may then be buffered for the transaction with the client system. At some point (e.g., during or after the transaction), the business objects would be saved in a database for persistent storage. This allows any changes to be “distributed” so that other services and/or business objects can access any changes associated with the business object.
Before a business object is saved to persistent storage and thus distributed, a finalize sequence may be performed. The finalize sequence may constitute a sequence of one or more steps performed to ensure that the proper data (or information) is saved to persistent storage. For example, when a finalize sequence is triggered, a business object may be placed in a checked mode, which limits access to the business object to read only while saves of business objects 402-408 to persistent storage are performed. The business object may then be recomputed before a save to account for any changes caused by other business objects that may have written to the business object. Next, the finalize sequence may include a “do save” mode which saves the business objects (e.g., the data and methods of the business object) to persistent storage.
When a business object writes to another business object, the sequencing of the saves to persistent storage may influence whether the saves associated with other business objects are performed correctly, e.g., whether the correct data is being saved. Specifically, if business object 402 writes to business object 406 and business object 408, while business object 406 writes to business object 408, the sequencing of any saves to persistent storage during the finalize sequence may not accurately record the true state of the data at business object 408 since two different business objects (namely 402 and 406) have written to (and thus changed) business object 408. The above example illustrates that there are cross dependencies between business objects that affect how business objects should be saved to a persistent storage mechanism, such as a database.